# File typeprof-0.21.2/lib/typeprof/lsp.rb, line 782
def read
while line = @io.gets
line2 = @io.gets
if line =~ /\AContent-length: (\d+)\r\n\z/i && line2 == "\r\n"
len = $1.to_i
json = JSON.parse(@io.read(len), symbolize_names: true)
yield json
else
raise ProtocolError, "LSP broken header"
end
end
end